package com.second.app.thread.reentrant.consumerproduce;

/**
 * @author gyz
 * @date 2021/2/2 10:44
 */
public class Main {
    public static void main(String[] args) {
        ConsumerProduce consumerProduce = new ConsumerProduce();

        new Thread(() -> {
            for(int i = 0;i<Integer.MAX_VALUE;i++){
                consumerProduce.set();
            }
        },"线程A").start();

        new Thread(() -> {
            for(int i = 0;i<Integer.MAX_VALUE;i++){
                consumerProduce.get();
            }
        },"线程B").start();
    }
}
